﻿<!--
Copyright © Pavel Fedarovich, 2010-2012

This file is part of AvalonWizard.
 
You may at your option receive a license to Avalon Wizard under 
either the terms of the Apache License version 2.0 or 
the GNU Lesser General Public License (LGPL) version 2.1 or any later version.
 
AvalonWizard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
You may obtain a copy of the Apache License at [http://www.apache.org/licenses/LICENSE-2.0].
You may obtain a copy of the LGPL at [http://www.gnu.org/licenses/].
-->
<Window 
    x:Class="AvalonWizardSample.EventLogWindow" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Title="Events" Height="300" Width="525" Left="100" Top="480" WindowStyle="ToolWindow">
    <ListBox Name="eventsList">
        <ListBox.ItemTemplate>
            <DataTemplate DataType="EventLogItem">
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="Sender:" FontWeight="Bold" Margin="0,0,4,0" />
                    <TextBlock Text="{Binding Sender}" Margin="0,0,10,0" />
                    <TextBlock Text="Event:" FontWeight="Bold" Margin="0,0,4,0" />
                    <TextBlock Text="{Binding EventName}" Margin="0,0,10,0" />
                    <StackPanel Orientation="Horizontal" Name="param">
                        <TextBlock Text="{Binding ParameterName}" FontWeight="Bold" />
                        <TextBlock Text=":" FontWeight="Bold" Margin="0,0,4,0" />
                        <TextBlock Text="{Binding ParameterValue, TargetNullValue=null}" />
                    </StackPanel>
                </StackPanel>
                <DataTemplate.Triggers>
                    <DataTrigger Binding="{Binding ParameterName}" Value="{x:Null}">
                        <Setter TargetName="param" Property="Visibility" Value="Collapsed" />
                    </DataTrigger>
                </DataTemplate.Triggers>
            </DataTemplate>
        </ListBox.ItemTemplate>
    </ListBox>
</Window>